angular.module('navbutton', [])
	.controller('navbtnCtrl', function($scope, navbtn) {
	
		navbtn.getNavLeftButtons()
			.then(function(data) {
				$scope.navButttons = data.data.data;
//				console.log(data.data.data);
			});
		$scope.navshow = false;
		$scope.btnClick = function() {
			$scope.navshow = !$scope.navshow;
		}
		$scope.imgclick=function(){
			$scope.navshow=false;
		}

	})

	.factory('navbtn', function($http) {
		
		var getNavLeftButtons = function() {
			return $http.get("/icy/m.php?method=Nav.getNavLeftButtons")
				.then(function(data) {
					return data;
				});
		};

		return {
			getNavLeftButtons
		};
	})


	